<?php

/**
 * JobeetPicture form.
 *
 * @package    jobeet
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class JobeetPictureForm extends BaseJobeetPictureForm
{
  public function configure()
  {  
        parent::setup();
      $this->widgetSchema['picture'] = 	new sfWidgetFormInputFileEditable(array(
      'label'  => ' Фото',
      'file_src'  =>'/uploads/'. $this->getObject()->getPicture(),
      'is_image'  => true,
      'edit_mode'  => !$this->isNew(),
      'template'  => '<div>%file%<br/>%input%<br/>%delete%%delete_label%</div>',
      ));
$this->validatorSchema['picture']        = new sfValidatorFile(array('path'=> sfConfig::get('sf_upload_dir')));

      $this->validatorSchema['picture_delete']  = new sfValidatorPass();

    $this->widgetSchema->setNameFormat('jobeet_picture[%s]');

    //$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);


    	unset($this->widgetSchema['created_at']);
	unset($this->widgetSchema['updated_at']);
	unset($this->validatorSchema['created_at']);
	unset($this->validatorSchema['updated_at']);
	
  }
}
